package me.zhengjie.config.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import me.zhengjie.config.enums.AtmrErrorEnum;

/**
 * 接口返回对象header头信息类
 *
 */
public class ResponseHeaderEntity {

    //是否成功
    @JsonProperty("isSuccess")
    private boolean isSuccess;

    //错误code：默认成功为：EC_ALL_00000
    @JsonProperty("errCode")
    private String errCode = AtmrErrorEnum.SUCCESS.getErrorCode();

    //错误message：默认为：操作成功
    @JsonProperty("errMsg")
    private String errMsg = AtmrErrorEnum.SUCCESS.getErrorMessage();

    @JsonProperty("infName")
    private String infName;
    
    public boolean isIsSuccess() {
        return AtmrErrorEnum.SUCCESS.getErrorCode().equals(errCode);
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

	public String getInfName() {
		return infName;
	}

	public void setInfName(String infName) {
		this.infName = infName;
	}
}
